/*
 * MIT License
 *
 * Copyright (c) 2020 wen.gu <454727014@qq.com>
 *
 * Permission is hereby granted, free of charge, to any person obtaining a copy
 * of this software and associated documentation files (the "Software"), to deal
 * in the Software without restriction, including without limitation the rights
 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
 * copies of the Software, and to permit persons to whom the Software is
 * furnished to do so, subject to the following conditions:
 *
 * The above copyright notice and this permission notice shall be included in all
 * copies or substantial portions of the Software.
 *
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
 * SOFTWARE.
 */

/***************************************************************************
 * Name: code_generator_fdbus.h
 *
 * Purpose: code generator with fdbus and default serializer/deserializer binding
 *
 * Developer:
 *   wen.gu , 2021-05-10
 *
 * TODO:
 *
 ***************************************************************************/

/******************************************************************************
 **    INCLUDES
 ******************************************************************************/
#ifndef __CODE_GENERATOR_FDBUS_H__
#define __CODE_GENERATOR_FDBUS_H__
#include <memory>

#include "code_generator.h"
/******************************************************************************
 **    MACROS
 ******************************************************************************/
#define TEMPLATE_HEADER "cpp_header.tpl"
#define TEMPLATE_SOURCE_CODE "cpp_source.tpl"


/** the variable in template file */
#define TPL_VAR_AUTHOR              "author"
#define TPL_VAR_DATE                "date"
#define TPL_VAR_FILE_NAME           "file_name"
#define TPL_VAR_FILE_DESCRIPTION    "file_descrition"
#define TPL_VAR_INCLUDES            "includes"
#define TPL_VAR_MACRO_DEF           "macro_defines"
#define TPL_VAR_TYPE_DEF            "type_defines"
#define TPL_VAR_API_DEF             "api_defines"
#define TPL_VAR_DEF_ONCE            "define_once"        


/******************************************************************************
 **    TYPE DEFINITIONS
 ******************************************************************************/



/******************************************************************************
 **    CLASSES/FUNCTIONS DEFINITIONS
 ******************************************************************************/
class CodeGeneratorFDBus: public CodeGenerator
{
public:
    CodeGeneratorFDBus();
    virtual ~CodeGeneratorFDBus();

public:
    bool setFileTemplatePath(const std::string& code_template_path) override;
    bool generate(const FileContent& file_content, SourceCodeFileArray& out_code)  override;

private:
    class Impl;
    std::unique_ptr<Impl> impl_;
};



#endif /** !__CODE_GENERATOR_FDBUS_H__ */

